package cn.zjq.unilityclass.kehouzuoye.three;

import java.util.Scanner;

public class Goods {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        double sumPrice = 0.00;
    String[] goods = new String[]{"电风扇","洗衣机","电视机","冰箱","空调"};
    double[] price = new double[]{124.23,4500.0,8800.9,5000.88,4456.0};
    StringBuffer[] str =new StringBuffer[5];

        System.out.println("---------------欢迎进入商品批发城---------------");
        System.out.println("编号\t"+"商品\t"+"价格");
        for (int i = 1; i < 6; i++) {
            System.out.println(i+"\t\t"+goods[i-1]+"\t"+price[i-1]);
        }
        System.out.println("--------------------------------------------------");
        System.out.print("请输入你批发的商品编号：");
        int i = input.nextInt();
        System.out.print("请输入批发数量：");
        int num = input.nextInt();
        sumPrice = price[i-1]*num;
        StringBuffer sb = new StringBuffer() ;
        System.out.println("您需要付款"+sumPrice+"元");
    }
}
